package com.myproj;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class MenuScreen extends Activity {
	
	@Override
	public void onCreate(Bundle savedInstanceState){
		super.onCreate(savedInstanceState);
		this.setContentView(R.layout.main);
		
		Button searchByAddress= (Button) this.findViewById(R.id.button1);
		searchByAddress.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View v) {
				startSearchByAddress();				
			}			
		});
		
		Button searchByProximity= (Button) this.findViewById(R.id.button1);
		searchByProximity.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View v) {
				startSearchByProximity();				
			}				
		});
	}
	
	private void startSearchByProximity() {
		Intent startSearch = new Intent(getApplicationContext(), SearchByProximity.class);
		startActivity(startSearch);			
	}	
	
	private void startSearchByAddress() {
		Intent startSearch = new Intent(getApplicationContext(), SearchByAddress.class);
		startActivity(startSearch);
	}
}


